<?php
//测试控制器类
class IndexController extends Controller{
    public function __init(){
        header("Content-type:text/html;charset=utf-8");
    }
    //动作方法
    public function index(){
        $db= M('blog');
//        $data = $db->where("id>10 and id<15 or title like '%houdunwang%'")->all();
//        $map['id']=12;
//        $map['cid']=1;
//        $map['_logic']='OR';
//        $data =$db->where($map)->all();
//
//        $map[]='title like "%houdun%"';
//        $map[]='cid>=1';
//        $data = $db->where($map)->all();
        $data = $db->where("id>2")->where("cid>=1")->where("title like '%hou%'")->all();
        p($data);
    }
}












